package com.jeasonzhao.report.engine.irp;

import com.jeasonzhao.commons.logger.Logger;
import com.jeasonzhao.report.engine.repo.DatabaseConfigurationRepository;
import com.jeasonzhao.report.engine.repo.DictRepository;
import com.jeasonzhao.report.engine.repo.ExceptionRepository;
import com.jeasonzhao.report.engine.repo.ReportRepository;
import com.jeasonzhao.report.exceptions.ReportLoaderException;

/**
 * Loader
 * Load all defination from resource
 **/
public interface IResourceLoader
{
    //Add the configuration items into instance
    //Those properties could be used int the function refresh.
    public void addProperty(String key,String value);

    //Load DICT/DATABASE/REPORT from resource.
    public void refresh(Logger log
                        ,DatabaseConfigurationRepository dbManager
                        ,DictRepository dictManager
                        ,ReportRepository reportManager
                        ,ExceptionRepository exceptionManager)
        throws ReportLoaderException;
}
